/**
 * api接口统一管理
 */
import { get, post } from './http'

//登录短信
export const smsLogin = p => post('v1/manage/sms/login', p)

//登录
export const login = p => post('/v1/manage/sysUser/login', p)

//数据推送
export const ADDPUSH = p => post('/v1/push/add', p)
export const PUSHLIST = p => post('/v1/push/list', p)
export const DELETEPUSH = p => post('/v1/push/delete', p)
export const CLOSEPUSH = p => post('/v1/push/close', p)
export const ACTIVEPUSH = P => post('/v1/push/active', P)
export const UPDATEPUSH = P => post('/v1/push/update', P)

// 列表用户
export const listUser = p => get('/v1/manage/sysUser/list', p)

//分页获取所有的url数据
export const listUrl = p => get('/v1/manage/display/list', p)

//编辑url数据
export const updateUrl = p => post('/v1/manage/display/update', p)

//增加url数据
export const addUrl = p => post('/v1/manage/display/add', p)

//删除url数据
export const delUrl = p => post('/v1/manage/display/del', p)

// 产线讯息
export const line = p => get('/v1/manage/display/getLine', p)

export const MANAGERS = p => get('/v1/manage/sysUser/list', p)
//aml用户管理
export const LISTAMLUSER = p => post('/v1/manage/sysUser/listAmlUser', p)
export const DELETEAMLUSER = p => get('/v1/manage/sysUser/deleteAmlUser', p)
export const AML_USER_DETAIL = p => post('/v1/manage/sysUser/amlUserDetail', p)

//商城用户管理
export const LISTSHOPUSER = p => post('/v1/manage/sysUser/listShopUser', p)
export const AUTHSHOPUSER = p => post('/v1/manage/sysUser/authShopUser', p)
export const DELETESHOPUSER = p => post('/v1/manage/sysUser/deleteShopUser', p)
export const UPDATESHOPUSER = p => post('/v1/manage/sysUser/updateShopUser', p)
export const FOX_USER_LIST = p => post('/v1/manage/sysUser/foxCoreList', p)


export const info = p => get('/v1/manage/sysUser/info', p)
export const getMobileById = p => get('/v1/manage/sysUser/getMobileById', p)
export const getMobile = p => get('/v1/manage/sysUser/getMobile', p)
export const listALI = p => get('/v1/manage/sysUser/listAll', p)
export const UPDATE_MANAGER = p => post('/v1/manage/sysUser/update', p)
export const LOCK_MANAGER_PWD = p => post('/v1/manage/sysUser/lock', p)
export const ADD_MANAGER = p => post('/v1/manage/sysUser/add', p)
export const ASSIGN_ROLE = p => post('/v1/manage/sysUserRole/add', p)
export const UPDATE_USER_ROLE = p => post('/v1/manage/sysUserRole/update', p)

export const ALL_MENUS = p => get('/v1/manage/sysRes/list', p)

export const ADD_CHILD_MENU = p => post('/v1/manage/sysRes/addChildren', p)
export const ADD_ROOT_MENU = p => post('/v1/manage/sysRes/addParent', p)
export const UPDATE_MENU = p => post('/v1/manage/sysRes/update', p)
export const DELETE_MENU = p => post('/v1/manage/sysRes/delete', p)
export const LIST_BY_ROLE = p => get('/v1/manage/sysRes/listByRole', p)

export const ROLES = p => get('/v1/manage/sysRole/list', p)
export const UPDATE_ROLE = p => post('/v1/manage/sysRole/update', p)
export const UPDATE_ROLE_RES = p => post('/v1/manage/sysRole/updateRes', p)
export const ADD_ROLE = p => post('/v1/manage/sysRole/add', p)
export const UPDATE_ROLE_STATE = p => post('/v1/manage/sysRole/updateState', p)
export const GET_MENUS_BY_ROLE = p => get('/v1/manage/sysRes/listRoleTree', p)
export const ASSIGN_PERMISSIONS = p => post('/v1/manage/sysRole/updateRes', p)
export const FOX_ROLE_LIST = p => get('/v1/manage/sysRole/foxCoreList', p)

//物料
export const PRODUCT_LIST = p => get('v1/product/list', p)
export const PRODUCT_ADD = p => post('v1/product/add', p)
export const PRODUCT_UPDATE = p => post('v1/product/update', p)
export const PRUDUCT_DETAIL = p => post('/v1/product/detail',p)
export const PRODUCT_BATCHDELETE = p => post('/v1/product/batchDelete', p)

//料号
export const LIAOHAO_LIST = p => get('v1/liaohao/list', p)
export const LIAOHAO_ADD = p => post('v1/liaohao/add', p)
export const LIAOHAO_UPDATE = p => post('v1/liaohao/update', p)
export const LIAOHAO_LIAOHAOLIST = p => get('v1/liaohao/liaohaoList', p) //仓库管理
export const LIAOHAO_INOUTSTORE = p => get('v1/liaohao/inOutStore', p) //仓库管理出入库
export const LIAOHAO_batchModifyPrice = P =>
  post('/v1/liaohao/batchModifyPrice', P) //批量修改料号价格
export const LIAOHAO_batchDelte = P => post('/v1/liaohao/batchDelete', P) //批量修改料号价格
export const UPDATE_PDF = P => post('v1/product/updateSpecsBook', P) //上传规格书

//日志
export const OPERATE_LIST = p => get('v1/operate/list', p)

//补料
export const GET_SINGLE_PRODUCT = p => get('v1/liaohao', p) // 查询料号
export const PRODUCT_MAKEUP_LIST = p => get('v1/product/makeup/list', p)
export const PRODUCT_MAKEUP_MY_LIST = p => get('v1/product/makeup/myList', p)
export const PRODUCT_MAKEUP_APPLY = p => post('v1/product/makeup/apply', p)
export const PRODUCT_MAKEUP_AGREE = p => post('v1/product/makeup/agree', p)
export const PRODUCT_MAKEUP_REFUSE = p => post('v1/product/makeup/refuse', p)
export const PRODUCT_MAKEUP_LISTBYMENU = p =>get('v1/product/makeup/listByMenu', p)

//图片文档
export const PRODUCT_IMAGE_FILE = p => post('v1/file/image/product', p)
export const PRODUCT_PDF_FILE = p => post('v1/file/pdf/product', p)

//订单
export const ORDER_LIST = p => get('v1/order/list', p)
export const S_ORDER_LIST = p => get('v1/order/slist', p)
export const ORDER_DETAIL_LIST = p => get('v1/orderCart/list', p)

export const ORDER_AGREE = p => post('v1/order/agree', p)
export const ORDER_REFUSE = p => post('v1/order/refuse', p)
//订单详情
export const ORDER_CART_LIST = p => get('v1/orderCart/list', p)

//发送信息
export const MSG_DIALOG = p => get('v1/foxMessage/listDialog', p)
export const MSG_LIST = p => get('v1/foxMessage/list', p)
export const MSG_ADD = p => post('v1/foxMessage/add', p)

//文档下载
export const ORDER_DOWNLOAD = p => post('v1/download/order', p)
export const PRODUCT_DOWNLOAD = p => post('v1/download/produce', p)
export const LIAOHAO_DOWNLOAD = p => post('v1/download/liaohao', p)
export const MAKEUP_DOWNLOAD = p => post('/v1/download/makeup', p)
export const CHAT_DOWNLOAD = p => post('v1/download/chat', p)

//供应商管理
export const SUPPLIER_ALLLIST = p => get('v1/menu/listAll', p)
export const MENU_LIST_SELECT = p => get('v1/menu/listSelect', p)
export const SUPPLIER_LIST = p => get('v1/menu/list', p)
export const SUPPLIER_ADD = p => post('v1/menu/add', p)
export const SUPPLIER_UPDATE = p => post('v1/menu/update', p)
export const AMLBINDNENU = p => post('v1/manage/sysUserRole/amlBindMenu', p)

//物料分类
export const CATEGORY_LIST = p => get('v1/category/list', p)
export const CATEGORY_ADD = p => post('v1/category/add', p)
export const CATEGORY_UPDATE = p => post('v1/category/update', p)
export const CATEGORY_CHILD_LIST = p => post('/v1/category/listZ', p)
//样品申请
export const SAMPLE_MY_LIST = p => get('v1/sample/myList', p)
export const SAMPLE_MAINLIST = p => get('v1/sample/mainList', p) //运营样品列表
export const SAMPLE_RECORDLISTBYMAINID = p =>get('v1/sample/recordListByMainId', p) //运营样品列表分表

//订单列表
export const ADMINORDERLIST = p => post('v1/redirect/adminOrderList', p)
export const ADMINCONFIRM = p => post('v1/redirect/adminConfirm', p) //确认订单

export const MENUINFOBYLIAOHAO = p => post('v1/liaohao/menuInfoByLiaohao', p) //确认订单
export const REPLYLIST = p => get('v1/order/replyByUni', p)
// export const SURECONFIRM = p => post('api/adminConfirm', p);// 财务订单详情下的确认订单
